package com.thrd.taiexhibition.presener;

import com.thrd.taiexhibition.bean.BeanThemeHome;
import com.thrd.taiexhibition.callback.MvpCallback;
import com.thrd.taiexhibition.model.ThemeExhibitonModel;
import com.thrd.taiexhibition.view.ThemeExhibitonView;

/**
 * @author: ${唐杰}
 * @date: 2021/3/23
 */
public class ThemeExhibitonPresener {
    private ThemeExhibitonModel mThemeExhibitonModel;
    private ThemeExhibitonView mThemeExhibitonView;

    public ThemeExhibitonPresener(ThemeExhibitonView mThemeExhibitonView){
        this.mThemeExhibitonView=mThemeExhibitonView;
        this.mThemeExhibitonModel=new ThemeExhibitonModel();
    }


    public void getThemeExhibitonData(long cityId){
        mThemeExhibitonModel.getThemeExhibitonData(String.valueOf(cityId), new MvpCallback<BeanThemeHome>() {
            @Override
            public void onSuccess(BeanThemeHome beanThemeHome) {
                mThemeExhibitonView.onSuccess(beanThemeHome);
            }

            @Override
            public void onFailed(String e, int code) {
                mThemeExhibitonView.onError(e,code);
            }
        });
    }


}
